﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BusinessObjects {
  /// <summary>
  /// Object representing a country
  /// </summary>
  public class Country : ObjectBase {

    private int countryId;
    private string countryName, countryCode;

    #region - Properties -

    /// <summary>
    /// Gets a value indicating whether this instance is new.
    /// </summary>
    /// <value>
    ///   <c>true</c> if this instance is new; otherwise, <c>false</c>.
    /// </value>
    public bool IsNew {
      get {
        if ( CountryId==0 ) {
          return true;
        } else {
          return false;
        }
      }
    }

    /// <summary>
    /// Gets the default country code.
    /// </summary>
    public static string DefaultCountryCode {
      get {
        return "BE";
      }
    }

    /// <summary>
    /// Gets the default country id.
    /// </summary>
    public static int DefaultCountryId {
      get {
        return 1;
      }
    }

    /// <summary>
    /// Gets or sets the country id.
    /// </summary>
    /// <value>
    /// The country id.
    /// </value>
    public int CountryId {
      get { return countryId; }
      set {
        SetField( ref countryId, value, "CountryId" );
      }
    }

    /// <summary>
    /// Gets or sets the country code.
    /// </summary>
    /// <value>
    /// The country code.
    /// </value>
    public string CountryCode {
      get { return countryCode; }
      set {
        SetField( ref countryCode, value, "CountryCode" );
      }
    }

    /// <summary>
    /// Gets or sets the name of the country.
    /// </summary>
    /// <value>
    /// The name of the country.
    /// </value>
    public string CountryName {
      get { return countryName; }
      set {
        SetField( ref countryName, value, "CountryName" );
      }
    }

    #endregion

  }
}
